<?php

$query = "select TR.id_Resultado as JORNADA,TR.id_Tipo_Partido as PARTIDO,CE.nom_Equipo as EQUIPO,TR.g_Local as GLOCAL,TR.g_Visita as GVISITA,TR.fecha as FECHA,TR.cronica as CRONICA from Tab_Resultados as TR inner join Cat_Equipos as CE on TR.id_Equipo=CE.id_Equipo";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
    if ($row["PARTIDO"] == 1) {
        echo "<td><center><font face=\"verdana\"> " .
        $row["JORNADA"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        " <img src=\"../../images/cruzazulforfun.jpg\" border=\"0\" width=\"50\" height=\"50\"></font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["GLOCAL"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\">" .
        " VS </font></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["GVISITA"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["EQUIPO"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["FECHA"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\">" .
        "<a href=" . $row["CRONICA"] . "> Cronica </font></center></td></tr>";
    } else if ($row["PARTIDO"] == 2) {
        echo "<td><center><font face=\"verdana\"> " .
        $row["JORNADA"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["EQUIPO"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["GLOCAL"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\">" .
        " VS </font></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["GVISITA"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        " <img src=\"../../images/cruzazulforfun.jpg\" border=\"0\" width=\"50\" height=\"50\"></font></center></td>";
        echo "<td><center><font face=\"verdana\"> " .
        $row["FECHA"] . " </font></center></td>";
        echo "<td><center><font face=\"verdana\">" .
        "<a href=" . $row["CRONICA"] . "> Cronica </font></center></td></tr>";
    }
}
mysql_free_result($result);
mysql_close($link);
?>